{extend name="public/base"/} {block name="body"}
<div class="main-box no-header clearfix">
    <header class="main-box-header clearfix">
        <div class="pull-left">
            <h2>{$meta_title}</h2>
        </div>
        <div class="pull-right">
            <!-- <a href="{:url('add')}" class="btn btn-primary pull-right"> <i class="fa fa-plus-circle fa-lg"></i> 新增</a> -->
        </div>
    </header>
    <div class="main-box-body clearfix">
        <div class="row">
            <form class="form-horizontal" action="{:url('addTime')}" method="post">
                <div class="col-md-2">
                    <p>
                        开始时间（格式为：08:00）
                    </p>
                    <input type="text" name="start_time" class="form-control">
                </div>
                <div class="col-md-2">
                    <p>
                        结束时间
                    </p>
                    <input type="text" name="end_time" class="form-control">
                </div>
                <div class="col-md-2">
                    <p>
                        配送限量
                    </p>
                    <input type="text" name="limit_num" class="form-control">
                </div>
                <div class="col-md-2">
                    <p>
                        类型
                    </p>
                    <select name="type">
                      <<option value="0">实体店水果</option>
                      <<option value="1">网约水果</option>
                    </select>
                </div>
                <div class="col-md-2">
                    <p>

                    </p><br />
                    <button type="submit" class="btn btn-danger submit-btn ajax-post" target-form="form-horizontal">添加</button>
                </div>
            </form>
        </div>

        <hr />
        实体店水果
        <div class="panel panel-default">
            <div class="panel-body">
              <div class="row">
                  <div class="col-md-12">
                    {volist name="list" id="vo"}
                      {eq name="vo.type" value="0"}
                      <span class="icon-btn">{$vo.start_time}--{$vo.end_time} | {$vo.limit_num} 次 <i class="fa fa-times-circle confirm ajax-get" aria-hidden="true" url="{:url('delTime',array('id'=>$vo['id']))} "></i></span>
                      {/eq}
                    {/volist}
                  </div>
                  <br />
              </div>
            </div>
        </div>
        邮寄水果
        <div class="panel panel-default">
            <div class="panel-body">
              <div class="row">
                  <div class="col-md-12">
                    {volist name="list" id="vo"}
                      {eq name="vo.type" value="1"}
                      <span class="icon-btn">{$vo.start_time}--{$vo.end_time} | {$vo.limit_num} 次 <i class="fa fa-times-circle confirm ajax-get" aria-hidden="true" url="{:url('delTime',array('id'=>$vo['id']))} "></i></span>
                      {/eq}
                    {/volist}
                  </div>
                  <br />
              </div>
            </div>
        </div>


        <style>
            .icon-btn {
                margin-left: 20px;
                margin-bottom: 10px;
                border: 1px solid #ddd;
                padding: 10px 20px;
                background-color: #fafafa !important;
                background-image: none !important;
                filter: none !important;
                -webkit-box-shadow: none !important;
                -moz-box-shadow: none !important;
                box-shadow: none !important;
                display: inline-block;
                color: #646464 !important;
                text-shadow: none !important;
                text-align: center;
                cursor: pointer;
                position: relative;
                -webkit-transition: all 0.3s ease !important;
                -moz-transition: all 0.3s ease !important;
                -ms-transition: all 0.3s ease !important;
                -o-transition: all 0.3s ease !important;
                transition: all 0.3s ease !important;
            }

            .icon-btn .fa {
                position: absolute;
                font-size: 20px !important;
                top: -5px;
                right: -5px;
                color: red;
            }
        </style>

    </div>
</div>
{/block}
